﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class Admin_changepassword : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        lblmsg.Visible = false;
        string oldPwd = JobSiteStarterKit.BOL.Common.ReadCommonSettingsAttributes("AdminPwd", this.Context);
        if (txtoldpass.Text == oldPwd)
        {
            lblmsg.Visible = true;
            string pwd = txtnewpass.Text.Trim();
            JobSiteStarterKit.BOL.Common.WriteCommonSettingsAttributes(pwd, this.Context);
            lblmsg.InnerHtml="Your New Password has been saved successfully !!!";
        }
        else
        {
            lblmsg.Visible = true;
        }
    }
    protected void btnRefresh_Click(object sender, EventArgs e)
    {
        txtoldpass.Text = "";
        txtnewpass.Text = "";
        lblmsg.Visible = false;
        
    }
    
}
